//
//  InternetConnection.m
//  tv3rss
//
//  Created by Job Search on 01/08/14.
//  Copyright (c) 2014 responsfabrikken. All rights reserved.
//

#import "InternetConnection.h"
#import "SystemConfiguration/SystemConfiguration.h"

@implementation InternetConnection

- (BOOL) isTV3rssURLreachable
{
	SCNetworkReachabilityFlags flags;
    BOOL receivedFlags;
    
    SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithName(CFAllocatorGetDefault(), [tv3sport UTF8String]);
    receivedFlags = SCNetworkReachabilityGetFlags(reachability, &flags);
    CFRelease(reachability);
    
    if (!receivedFlags || (flags == 0) )
    {
        return FALSE;
    } else {
		return TRUE;
	}
}

-(NSURL *)  getTV3rssURL{
    
    return [NSURL URLWithString:@"http://www.tv3sport.dk/feed/?post_type=news"];
}

@end
